Echo canceler employing multiple step gains

ABSTRACT

According to a first aspect of the invention, in an echo canceler having an adaptive filter, the tap coefficients of the adaptive filter are partitioned into at least two segments, and different step gains are assigned to different segments. The step gains are used in adjusting the tap coefficients, and determine the sensitivity of the adjustment to noise in the residual signal left after echo cancellation. Comparatively small step gains are assigned to noise-sensitive segments. According to a second aspect of the invention, the step gain is switched according to the level of local background noise.

BACKGROUND OF THE INVENTION

The present invention relates to an echo canceler for removing echo froman input signal in which local background noise is also present.

Echo cancelers are used in videoconferencing terminals, mobile telephonesets, and the like, to prevent the party at the far end from beingdistracted by hearing an echo of his or her own voice. The echo cancelerhas an adaptive filter that operates on the signal received from the farend to predict the echo that this signal will produce. The predictedecho is subtracted from the local input signal to remove the echo fromthe signal sent back to the far end.

To adapt to changes in the local echo path, the tap coefficients of theadaptive filter are adjusted by a mathematical algorithm, such as thewell-known normalized least mean squares (NLMS) algorithm, that forcesthe coefficients to converge to values matching the impulse response ofthe echo path. The best time to adjust the tap coefficients is when theparty at the far end is speaking and the party at the near end is notspeaking. Most echo cancelers confine tap-coefficient adjustments tothis so-called single-talk state, which can be detected by monitoringthe power of the signals involved.

Even when the party at the near end is not speaking, however, localbackground noise may be present. The residual echo of the far-endspeaker's voice cannot easily be separated from the local backgroundnoise, so at moderate or high levels of the local background noise, thetap coefficients cannot be adjusted accurately.

One proposed solution to this problem is the summational NLMS algorithm,which replaces the numerator and denominator values in the NLMSalgorithm with sums of these values over an interval of time. The lengthof the summing interval increases as the power of the outgoing signaldecreases. The theory is that over the summing interval, the localbackground noise will average out to substantially zero, making accurateadjustment of the tap coefficients possible despite the local backgroundnoise.

In many situations, however, the local background noise has componentsthat do not average out to zero. Examples of such components includeengine noise in an automobile, ventilator noise inside buildings, andcrowd noise in the outdoor environments in which portable telephone setsare often used. The summational NLMS algorithm fails to protect theadaptive filter from the effects of this type of local background noise.The summational NLMS algorithm works well only when the local backgroundnoise has certain statistical characteristics, such as thecharacteristics of white noise.

To complicate the problem, the echo canceler may be combined with anoise canceler that removes at least some of the local background noisecomponents from the outgoing signal. This makes the residual echo easierto detect, but the noise canceler's internal characteristics can affectthe adjustment of the echo canceler's tap coefficients, and in any case,cancellation of the local background noise is rarely complete.

SUMMARY OF THE INVENTION

It is accordingly an object of the present invention to improve echocancellation by reducing the effects of local background noise on theadjustment of tap coefficients in an echo canceler.

A further object is to improve echo cancellation when local backgroundnoise is also canceled.

The invented echo cancellation method employs an adaptive filter, andadjusts the tap coefficients of the adaptive filter according to aresidual signal left after echo cancellation, using an algorithm inwhich a step gain determines the sensitivity of the adjustment to theresidual signal. According to a first aspect of the invention, the echocancellation method comprises the steps of:

partitioning the tap coefficients into at least two segments, which areaffected to different degrees by local background noise; and

assigning different step gains to the different segments.

A preferred method of partitioning the tap coefficients calculatessmoothed absolute values of the tap coefficients, calculates the noisepower of the residual signal, and compares the smoothed absolute valuesof the tap coefficients with the noise power.

An echo canceler according to the first aspect of the inventioncomprises a partitioner for partitioning the tap coefficients, and astep gain generator for assigning step gains.

An echo cancellation method according to a second aspect of theinvention comprises at least the first two, and preferably all four, ofthe following steps:

classifying the local background noise level;

selecting different step gains according to the class of the localbackground noise level;

canceling local background noise from the residual signal; and

choosing between the residual signal before noise cancellation and theresidual signal after noise cancellation for use in adjustment of thetap coefficients, according to the local background noise level.

These steps can also be incorporated into the first aspect of theinvention.

An echo canceler according to the second aspect of the inventioncomprises a noise level classifier for classifying the local backgroundnoise level, and a step gain generator for selecting step gains. Theecho canceler may be combined with a noise canceler that cancels noisein the residual signal; in that case, the noise level classifier choosesbetween the input and output of the noise canceler for use in adjustingthe tap coefficients.

BRIEF DESCRIPTION OF THE DRAWINGS

In the attached drawings:

FIG. 1 is a block diagram of a first embodiment of the invention;

FIG. 2 is a graph showing an example of tap coefficients in the firstembodiment;

FIG. 3 is a graph showing the absolute values of the tap coefficients inFIG. 2;

FIG. 4 is a graph showing smoothed absolute values of the tapcoefficients in FIG. 2;

FIG. 5 is a block diagram of a second embodiment of the invention; and

FIG. 6 is a block diagram of a third embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the present invention will be described with reference tothe attached exemplary drawings.

Referring to FIG. 1, the first embodiment operates in a communicationdevice, such as a videoconferencing device or mobile telephone set,having an input terminal 1 for receiving a signal transmitted from adistant communication terminal, an analog-to-digital converter (ADC) 2for converting the received signal to a digital signal X(n), adigital-to-analog converter (DAC) 3 for converting X(n) back to ananalog signal, and a loudspeaker 4 through which the analog signaloutput by the DAC 3 is reproduced as an acoustic signal. A microphone 5picks up part of the reproduced acoustic signal as an acoustic echosignal E. The microphone 5 also picks up a local background noise signalN and, when the local party is speaking, a local speech signal S. Themicrophone 5 converts these local acoustic input signals E, S, and N toan analog electrical signal, which is converted by an ADC 6 to a digitalsignal, denoted Y(n). An adder 7 adds the two's complement of an echoreplica signal Y′(n), thereby subtracting Y′(n) from Y(n), to create afirst residual signal e₁(n). Noise cancellation (described below)creates a second residual signal e₂(n) from the first residual signale₁(n). A selected one of the two residual signals e₁(n) and e₂(n) isconverted to an analog signal by a DAC 8, and provided to an outputterminal 9 for transmission to the distant communication terminal,referred to below as the far end.

The letter ‘n’ above is a discrete time variable, designating aparticular sample of the digital signals.

The echo replica signal Y′(n) is generated by an adaptive filter 10comprising a tap coefficient register 11, a multiplier 12, a sampleregister 13, and an accumulator 14. The tap coefficient register 11stores tap coefficients, which the multiplier 12 multiplies by asequence of samples representing the most recent samples of the far-endsignal X(n), which are stored in the sample register 13. The accumulator14 sums the results to obtain the echo replica signal Y′(n).

The tap coefficients are adjusted by means of a noise power calculator15, a partitioner 16, an absolute smoother 17, and a step gain generator18. By comparing the outputs of the noise power calculator 15 andabsolute smoother 17, the partitioner 16 divides the tap coefficientsinto two segments. The step gain generator 18 generates separate stepgains for the two segments, and uses these step gains to adjust the tapcoefficients in each segment according to the NLMS algorithm.

A noise canceler 19 is inserted between the adder 7 and DAC 8, toestimate signal components due to the local background noise N, andremove these noise components from the outgoing signal. The input signalof the noise canceler 19 is the first residual signal e₁(n). The outputsignal of the noise canceler 19 is the second residual signal e₂(n). Thenoise canceler 19 can employ any of various well-known noisecancellation methods, such as spectral subtraction, bandsplittingattenuation, or adaptive filtering, descriptions of which will beomitted.

The two residual signals e₁(n) and e₂(n) are supplied to a noise levelclassifier 20, which selects one or both of the two residual signals foruse in adjusting the tap coefficients. The residual signal used inadjusting the tap coefficients, denoted e₃(n) in the drawing, issupplied to the step gain generator 18. Although not explicitly shown inthe diagram, the noise level classifier 20 also selects which of the tworesidual signals e₁(n) and e₂(n) is sent to the DAC 8. The residualsignal sent to the DAC 8 is not necessarily the same as the residualsignal e₃(n) supplied to the step gain generator 18.

The adder 7, adaptive filter 10, noise power calculator 15, partitioner16, absolute smoother 17, step gain generator 18, and noise levelclassifier 20 constitute the echo canceler 21. Of these elements, theadder 7 and adaptive filter 10 operate at all times. A double-talkdetector (not shown) disables the noise power calculator 15, partitioner16, absolute smoother 17, step gain generator 18, and noise levelclassifier 20 while the local party is speaking, so that the tapcoefficients are not adjusted during these times. The double-talkdetector also halts adjustment of the tap coefficients when the speakerat the far end is completely silent.

The operation of the individual noise canceler elements will now bedescribed in more detail.

The tap coefficients stored in the tap coefficient register 11 at time nwill be denoted H_(m)(n). The number of tap coefficients will be denotedby the letter I, so the subscript m varies from one to I.

The sample values stored in the sample register 13 at time n will bedenoted X_(m)(n), where m again varies from one to I. X₁(n) is the mostrecent sample, equal to X(n) itself. X₂(n) is the next most recentsample, equal to X(n−1), and so on.

The operations performed by the multiplier 12 and accumulator 14 can beexpressed mathematically as follows.${Y^{\prime}(n)} = {\sum\limits_{m = 1}^{I}\quad {{H_{m}(n)}{X_{m}(n)}}}$

The noise power calculator 15 calculates the power Np of the firstresidual signal e₁(n). Np is referred to as a noise power value because,when local speech S is absent, e₁(n) consists of local background noiseand residual echo, which is also a type of noise. Np is calculated as aweighted average of the absolute value of e₁(n) over an interval ofsamples, referred to as a frame. The noise power calculation can becarried out by an iterative smoothing operation described by theequation below, in which a₁ is a smoothing factor disposed strictlybetween zero and one (0<a₁<1). A typical value of a₁ is 0.5, althoughthe first embodiment is not limited to this value.

Np(j)=a₁Np(j−1)+ABS(e₁(j))(1−a₁)

In this equation, ABS denotes the absolute value, and j is the samplenumber in the frame. The oldest sample in the frame is e₁(1). The mostrecent sample is e₁(J), where J is the number of samples per frame. Theinitial power value Np(0) is zero. The final power value Np(J) is thenoise power value Np determined by the noise power calculator 15.

The first embodiment is not limited to this method of calculating Np. Analternative method is to take the simple arithmetic average of theabsolute values of the J sample values e₁(j) in the frame.

At the end of the frame, the noise power calculator 15 compares thecalculated noise power value Np(J) with a predetermined threshold value,and supplies Np(J) to the partitioner 16 if Np(J) exceeds the threshold.

When the noise power calculator 15 supplies Np(J) to the partitioner 16,the absolute smoother 17 supplies the partitioner 16 with a set ofsmoothed absolute values calculated from the tap coefficients stored inthe tap coefficient register 11. The absolute smoother 17 performs, forexample, the following iterative calculation, in which δ is a smoothingfactor (0<δ<1). A typical value of δ is 0.5, although the firstembodiment is not limited to this value. The value of m is an integerfrom 1 to I, where I is the number of tap coefficients.

ah₁(m)=ABS(H_(m)(n))

avah₁(m)=δah₁(m)+(1−δ)avah₁(m−1)

In these equations, ah₁(m) is the absolute value of the m-th tapcoefficient H_(m)(n), and avah₁(m) is a weighted average of the first mtap coefficients. The initial weighted average value avah₁(0) is equalto zero. The absolute smoother 17 supplies the partitioner 16 with acomplete set of weighted average values from avah₁(1) to avah₁(I).

The first embodiment is not limited to this method of calculatingavah₁(m). An alternative method is to calculate avah₁(m) as the simplearithmetic average of the absolute values from ah₁(l) to ah₁(m).

FIG. 2 shows a typical example of the tap coefficients H_(m)(n) at atime n. FIG. 3 shows the corresponding absolute values ah₁(m). FIG. 4shows the weighted average values avah₁(m). In each of these drawings,the horizontal axis represents the tap number (m), and the vertical axisrepresents the corresponding value of H_(m)(n), ah₁(m), or avah₁(m). Thecalculation performed by the absolute smoother 17 can be seen topreserve the general trend of the absolute values of the tapcoefficients, while smoothing out abrupt changes in these values.

The partitioner 16 adds an offset ε to the noise power value Np(J) andcompares the result with the smoothed absolute values avah₁(m), indescending order of the tap number m, starting from the I-th smoothedabsolute value avah₁(I). The tap number of the first smoothed tapcoefficient that exceeds the sum of the noise power value Np(J) andoffset ε is set as a boundary tap number M. The partitioner 16accordingly finds the maximum value of m for which the followinginequality is satisfied.

Np(J)+ε<avah₁(m)

This boundary tap number M divides the tap coefficients into a firstsegment, from H₁(n) to H_(M)(n), and a second segment, from H_(M+1)(n)to H_(I)(n).

Examples of the values of Np(J) and Np(J)+ε are indicated as Np and Np+εin FIGS. 3 and 4, respectively.

In adjusting the tap coefficients, the step gain generator 18 uses thesample values of the far-end signal X_(m)(n) stored in the sampleregister 13, the residual signal e₃(n) supplied by the noise levelclassifier 20, the boundary value M supplied by the partitioner 16, andtwo step gain values α₁ and α₂. Both step gain values are disposed inthe interval from zero to one: for example, α₁ can be equal to 0.7, anda α₂ to 0.125. The first embodiment is not limited to these particularvalues, but the first step gain α₁ must be greater than the second stepgain α₂. The first step gain α₁ is used only in the first segment of tapcoefficients. The second step gain α₂ can be used in the second segmentof tap coefficients, or in both segments.

The adjustment is performed by the NLMS algorithm, as described in theequations below. H_(m)(n) denotes the value of the m-th tap coefficientH_(m)(n) at time n, and H_(m)(n+1) denotes the adjusted value of thesame tap coefficient H_(m)(n) at time n+1. The symbol Σ denotessummation over values of an index integer i from 1 to I.

When the noise level classifier 20 selects the first residual signale₁(n) for use as e₃(n), the adjustment is performed according to thefollowing equation, using the first step gain α1 in the first segment oftap coefficients, and the second step gain α₂ in the second segment.

H_(m)(n+1)=H_(m)(n)+αX_(m)(n)e₃(n)/(ΣX_(i)(n)X_(i)(n))

 α=α1 when 1≦m≦M

 α=α2 when M+1≦m≦I

When the noise level classifier 20 selects the second residual signale₂(n) for use as e₃(n), the adjustment is performed according to thefollowing equation, in which d is a quantity that corresponds to theprocessing delay of the noise canceler 19. The second step gain α₂ isused unconditionally.

H_(m)(n+1)=H_(m)(n)+α₂X_(m)(n−d)e₃(n)/(ΣX_(i)(n−d)X_(i)(n−d))

The noise level classifier 20 classifies the local background noise onthe basis of a pair of ratios, denoted NCANC and ACOM below. NCANC is anoise canceling ratio, equal to the magnitude ratio between the inpute₁(n) and output e₂(n) of the noise canceler 19. ACOM is an acousticecho attenuation ratio, equal to the magnitude ratio between thereceived signal X(n) and the output e₂(n) of the noise canceler 19. Thenoise level classifier 20 compares NCANC with a predetermined thresholdvalue ζ, and compares ACOM with another predetermined threshold value λ.

When NCANC is less than ζ (NCANC<ζ) and ACOM is equal to or greater thanλ (ACOM≧λ), the noise level classifier 20 classifies the localbackground noise level as low, and selects the first residual signale₁(n) for input to both the DAC 8 and the step gain generator 18. Thefirst residual signal e₁(n) is used as e₃(n) for adjusting all of thetap coefficients, and also becomes the signal transmitted from theoutput terminal 9, after digital-to-analog conversion by the DAC 8.

When ACOM is less than λ (ACOM<λ), the noise level classifier 20classifies the local background noise level as high, and selects thesecond residual signal e₂(n) for input to both the DAC 8 and the stepgain generator 18. The second residual signal e₂(n) is used as e₃(n) foradjusting all of the tap coefficients, and also becomes the signaltransmitted from the output terminal 9, after digital-to-analogconversion by the DAC 8. This selection is made regardless of the valueof NCANC.

When NCANC is equal to or greater than ζ (NCANC≧ζ) and ACOM is equal toor greater than λ (ACOM≧λ), the noise level classifier 20 classifies thelocal background noise level as intermediate, selects the secondresidual signal e₂(n) for input to the DAC 8, and selects both residualsignals for input to the step gain generator 18. The first residualsignal e₁(n) is used as e₃(n) for adjusting the first segment of tapcoefficients. The second residual signal e₂(n) is used as e₃(n) foradjusting the second segment of tap coefficients.

The echo canceler 21 can be implemented in hardware, as anapplication-specific integrated circuit, for example. The echo canceler21 can also be implemented in software, by programming a general-purposeprocessor such as a digital signal processor to carry out the functionsof the elements shown in FIG. 1.

Next, the overall operation of the echo canceler 21 will be describedfor various cases of far-end and near-end speech and local backgroundnoise.

When the party at the far end is speaking, the party at the near end isnot speaking, and little local background noise is present, the echocanceler 21 is able to adjust the tap coefficients on the basis of astrong acoustic echo with comparatively little local interference,leading to accurate echo cancellation, so the condition ACOM≧λ will besatisfied. Since there is not much local background noise for the noisecanceler 19 to remove, the condition NCANC<ζ will also be satisfied, andthe noise level classifier 20 will classify the local background noiselevel as low. The noise canceler 19 is accordingly removed from thetransmission path, and the first residual signal e₁(n) is used forupdating all of the tap coefficients. Echo cancellation is not affectedby the internal characteristics of the noise canceler 19.

The first M tap coefficients, constituting the first segment, areadjusted with the first step gain α₁. As shown in FIG. 3, most of thesecoefficients are larger in magnitude than the noise power value Np, solocal background noise has a comparatively small effect on theadjustments made to these coefficients. Use of the comparatively largestep gain α₁ allows the NLMS algorithm to converge quickly to thedesired values of these tap coefficients, enabling rapid adjustment tochanges in the echo path.

The (M+1)-th to I-th tap coefficients, constituting the second segment,are adjusted with the second step gain α₂. These tap coefficients aremore sensitive to noise effects, because their magnitude is generallycomparable to, or less than, the noise level. Use of the comparativelysmall step gain α₂ prevents large, erratic adjustments from being madeto these tap coefficients due to local background noise.

The boundary M between the tap coefficients that are sensitive to localbackground noise and the tap coefficients that are not sensitive to suchnoise may change, due to a change in the echo path, or due to anincrease in the amount of local background noise. In either case, theresult is an increase in the noise power Np calculated by the noisepower calculator 15. When the noise power Np exceeds the relevantthreshold level, the partitioner 16 recomputes the boundary M, bycomparing Np plus the offset ε with the smoothed tap coefficient valuesoutput by the absolute smoother 17. Adding the offset ε to the noisepower value Np prevents the echo canceler 21 from being overly sensitiveto fluctuations in the noise level.

If the local background noise level increases to the point where thereis significant noise for the noise canceler 19 to remove, withoutincreasing so far as to interfere drastically with echo cancellation,the conditions NCANC≧ζ and ACOM≧λ will be satisfied, causing the noiselevel classifier 20 to classify the local background noise level asintermediate. The second residual signal e₂(n), in which the localbackground noise is reduced, is now sent to the far end. The tapcoefficients in the second segment, which are more sensitive to noise,are now adjusted on the basis of the second residual signal e₂(n), withthe processing delay d of the noise canceler 19 included in theadjustment. Use of the second residual signal e₂(n) and thecomparatively small second step gain α₂ keeps large, erratic adjustmentsfrom being made.

The tap coefficients in the first segment, which are less sensitive tonoise, continue to be adjusted on the basis of the first residual signale₁(n), using the comparatively large first step gain α₁. Adjustments tochanges in the echo path can therefore still be made comparativelyrapidly. Since the first residual signal e₁(n) contains the trueresidual echo, unmodified by the noise canceler 19, the adjustments canalso be made accurately.

When the noise level classifier 20 detects an intermediate localbackground noise level, the noise power Np detected by the noise powercalculator 15 will exceed the threshold value for recomputing theboundary value M relatively frequently, and the partitioner 16 will keepthe boundary positioned so that tap coefficients sensitive to localbackground noise are correctly placed in the second segment.

If the local background noise level becomes very high, or if the partyat the far end stops speaking, it may become difficult to detect muchecho cancellation, causing the echo attenuation ratio ACOM to fall belowthe threshold value λ, and the noise level classifier 20 to classify thelocal background noise level as high. This high classification meansthat the local background noise level is high in relation to the signalreceived from the far end. If the party at the far end is speaking, alltap coefficients are adjusted on the basis of the second residual signale₂(n), using the second step gain α₂ and delay d, and e₂(n) is sent tothe far end.

The low echo attenuation ratio ACOM indicates that in the first residualsignal e₁(n), the residual echo is being disguised by local backgroundnoise, which is likely to prevent accurate adjustment of the tapcoefficients. Beneficial adjustments may still be made using the secondresidual signal e₂(n), however, in which the noise level is reduced. Thecomparatively small second step gain α₂ prevents the echo canceler 21from being too strongly affected by the local background noise.

If the party at the far end is not speaking, the double-talk detectorhalts tap adjustment, as mentioned above.

When the party at the near end is speaking, since the noise canceler 19must not remove the near-end speech component (S), the tap coefficientscannot be adjusted correctly, even using the second residual signale₂(n). The double-talk detector also prevents adjustment of the tapcoefficients at these times. Echo cancellation continues, however, usingthe existing values of the tap coefficients.

In the first embodiment, sensitive tap coefficients are protected fromnoise effects by use of a comparatively small step gain, and by use ofthe residual signal output from the noise canceler 19 when the localbackground noise level is classified as intermediate or high. At thesame time, tap coefficients which are not sensitive to noise arepermitted to converge quickly, by use of a comparatively large step gainand use of the residual signal input to the noise canceler 19, unlessthe local background noise level is classified as high. At high levelsof local background noise, the first embodiment adjusts the tapcoefficients conservatively, using a small step gain and the residualsignal output by the noise canceler 19 for all tap coefficients.

As a result, when local background noise is present, the firstembodiment can improve significantly on the performance of an echocanceler employing a single step gain for all tap coefficients.Moreover, unlike an echo canceler employing the summational NLMSalgorithm, the first embodiment does not require the local backgroundnoise to have any particular statistical characteristics. A performanceimprovement is obtainable for all types of local background noise.

Next, a second embodiment will be described.

FIG. 5 shows the second embodiment, using the same reference numerals asin FIG. 1 for equivalent elements. The second embodiment differs fromthe first embodiment in having no noise level classifier. The secondresidual signal e₂(n) is always supplied to the DAC 8 and step gaingenerator 18, and is used for all tap-coefficient adjustments.

The adaptive filter 10, noise power calculator 15, partitioner 16, andabsolute smoother 17 operate as in the first embodiment. The step gaingenerator 18 adjusts the tap coefficients according to the followingequation, using the comparatively large first step gain α₁ for the firstsegment of tap coefficients, using the comparatively small second stepgain α₂ for the second segment of tap coefficients, and always using thequantity d to compensate for the processing delay of the noise canceler19.

 H_(m)(n+1)=H_(m)(n)+αX_(m)(n−d)e₂(n)/(ΣX_(i)(n−d)X_(i)(n−d))

 α=α₁ when 1≦m≦M

 α=α₂ when M+1≦m≦I

Like the first embodiment, the second embodiment protects sensitive tapcoefficients from local background noise effects, by employing differentstep gains for the two segments, without relying on statisticalproperties of the local background noise.

When implemented in hardware, the second embodiment is simpler than thefirst embodiment, due to the elimination of the noise level classifier.When implemented in software, the second embodiment can operate fasterthan the first embodiment, due to the elimination of computationrequired to calculate ACOM and NCANC. Further simplification andspeed-up results from the elimination of the need to store data forthese calculations.

Next, a third embodiment of the invention will be described.

FIG. 6 shows the third embodiment, using the same reference numerals asin FIGS. 1 and 5 for equivalent elements. The third embodiment differsfrom the preceding embodiments in having no noise canceler and no noiselevel classifier. The first residual signal e₁(n) is always supplied tothe DAC 8 and step gain generator 18, and is used for alltap-coefficient adjustments.

The adaptive filter 10, noise power calculator 15, partitioner 16,absolute smoother 17, and step gain generator 18 operate as in the firstembodiment. The step gain generator 18 adjusts the tap coefficientsaccording to the equation given in the first embodiment for the case inwhich the first residual signal e₁(n) was selected. This equation can berewritten as follows.

 H_(m)(n+1)=H_(m)(n)+αX_(m)(n)e₁(n)/(ΣX_(i)(n)X_(i)(n))

 α=α₁ when 1≦m≦M

 α=α₂ when M+1≦m≦I

Like the preceding embodiments, the third embodiment protects sensitivetap coefficients from local background noise effects, without relying onstatistical properties of the local background noise. The thirdembodiment also shows that the invention can be practiced without noisecancellation.

Next, a few variations of the preceding embodiments will be described.

One variation divides the tap coefficients into more than two segments,by finding more than one boundary value, and uses a different step gainfor each segment.

Another variation uses an algorithm other than the NLMS algorithm toadjust the tap coefficients. Any algorithm having a step gain thatdetermines the sensitivity of the adjustment to the residual signal canbe employed.

As another variation, the noise power calculator 15 can calculate thenoise power by summing squares of the residual signal values, instead ofsumming absolute values.

In the first embodiment, the same two step gains α₁ and α₂ were used tocover all three levels of local background noise, but as a variationseparate step gains can be provided for each level. For example, α₁ andα₂ can be used at the low level, a third step gain α3 can be used at thehigh level, and a fourth step gain α4 and fifth step gain α5 can be usedat the intermediate level.

The number of different local background noise levels recognized by thenoise level classifier is not limited to three. The noise levelclassifier can classify the local background noise into only two levels(high and low), for example, or into more than three levels.

The method by which the noise level classifier classifies the localbackground noise level can also be varied. For example, the acousticecho attenuation ratio ACOM can be calculated from the first residualsignal e₁(n) instead of the second residual signal e₂(n). ACOM can alsobe calculated as a power ratio instead of a magnitude ratio, or as adifference between absolute values instead of as a ratio.

As another variation, corresponding to the second aspect of theinvention, the step gain can be switched on the basis of the localbackground noise level alone, without dividing the tap coefficients intosegments. This variation can be practiced by eliminating the noise powercalculator, partitioner, and absolute smoother from the firstembodiment. The step gain generator uses the same step gain for all tapcoefficients, but generates different step gains according to the localbackground noise level as detected by the noise level classifier.

Applications of the invented echo canceler are not limited tocommunication terminals. For example, the invention can be applied inautomobile navigation equipment having a human interface that employsspeech synthesis and speech recognition systems, to prevent the speechrecognition system from being confused by the acoustic output of thespeech synthesis system.

Those skilled in the art will recognize that further variations arepossible within the scope claimed below.

What is claimed is:
 1. An echo cancellation method employing an adaptive filter to generate an echo replica signal, subtracting the echo replica signal from a local input signal in which local background noise is present, thereby canceling echo, and adjusting tap coefficients of the adaptive filter according to a residual signal left after echo cancellation, using an algorithm in which a step gain determines adjustment sensitivity to the residual signal, comprising the steps of: partitioning said tap coefficients into at least two segments based on a relationship between said tap coefficients and said local background noise, said segments being affected to different degrees by said local background noise; assigning at least two different step gains to respective segments, for use in adjusting the tap coefficients in said segments; classifying said local background noise into different levels; and selecting different step gains for assignment to said segments, corresponding to said different levels of said local background noise; canceling said local background noise from said residual signal; choosing between using said residual signal before cancellation of said local background noise, and using said residual signal after cancellation of said local background noise, for adjusting said tap coefficients; wherein said local background noise is classified into low, intermediate, and high levels, and said step of choosing comprises: choosing said residual signal before cancellation of said local background noise when said local background noise is classified as low; choosing said residual signal after cancellation of said local background noise when said local background noise is classified as high; and choosing said residual signal before cancellation of said local background noise for adjusting the tap coefficients in a first one of said segments, and choosing said residual signal after cancellation of said local background noise for adjusting the tap coefficients in a second one of said segments, the second one of said segments being more sensitive to said local background noise than the first one of said segments, when said local background noise is classified as intermediate.
 2. An echo canceler, having an adaptive filter that generates an echo replica signal, subtracting said echo replica signal from a local input signal in which local background noise is present, thereby canceling echo, and adjusting tap coefficients of the adaptive filter according to a residual signal left after echo cancellation, using an algorithm in which a step gain determines adjustment sensitivity to the residual signal, comprising: a partitioner for partitioning said tap coefficients into at least two segments based on a relationship between said tap coefficients and said local background noise, said segments being affected to different degrees by said local background noise; a step gain generator coupled to said partitioner, for assigning at least two different step gains to respective segments, for use in adjusting the tap coefficients in said segments; a noise level classifier, coupled to said step gain generator, for classifying said local background noise into different levels, and causing said step gain generator to select different step gains for assignment to said segments, corresponding to said different levels of said local background noise; and a noise canceler for canceling said local background noise from said residual signal; wherein said noise level classifier further chooses between using said residual signal before cancellation of said local background noise, and using said residual signal after cancellation of said local background noise, for adjusting said tap coefficients; wherein said noise level classifier classifies said local background noise into low, intermediate, and high levels, chooses said residual signal before cancellation of said local background noise when said local background noise is classified as low, chooses said residual signal after cancellation of said local background noise when said local background noise is classified as high, and chooses said residual signal before cancellation of said local background noise for adjusting the tap coefficients in a first one of said segments and said residual signal after cancellation of said local background noise for adjusting the tap coefficients in a second one of said segments, the second one of said segments being more sensitive to said local background noise than the first one of said segments, when said local background noise is classified as intermediate.
 3. An echo cancellation method employing an adaptive filter to generate an echo replica signal, subtracting the echo replica signal from a local input signal in which local background noise is present, thereby canceling echo, and adjusting tap coefficients of the adaptive filter according to a residual signal left after echo cancellation, using an algorithm in which a step gain determines adjustment sensitivity to the residual signal, comprising the steps of: classifying said local background noise into different levels; selecting different step gains for use in adjusting said tap coefficients, corresponding to said different levels of said local background noise; canceling said local background noise from said residual signal; and choosing between using said residual signal before cancellation of said local background noise, and using said residual signal after cancellation of said local background noise, for adjusting said tap coefficients; wherein said local background noise is classified into low, intermediate, and high levels, and said step of choosing comprises: choosing said residual signal before cancellation of said local background noise when said local background noise is classified as low; choosing said residual signal after cancellation of said local background noise when said local background noise is classified as high; and choosing said residual signal before cancellation of said local background noise for adjusting some of said tap coefficients, and choosing said residual signal after cancellation of said local background noise for adjusting some other of said tap coefficients, when said local background noise is classified as intermediate.
 4. An echo canceler, having an adaptive filter that generates an echo replica signal, subtracting said echo replica signal from a local input signal in which local background noise is present, thereby canceling echo, and adjusting tap coefficients of the adaptive filter according to a residual signal left after echo cancellation, using an algorithm in which a step gain determines adjustment sensitivity to the residual signal, comprising a noise level classifier for classifying said local background noise into different levels; a step gain generator, coupled to said noise level classifier, for selecting different step gains for use in adjusting said tap coefficients, corresponding to said different levels of said local background noise; and a noise canceler for canceling said local background noise from said residual signal, wherein said noise level classifier chooses between using said residual signal before cancellation of said local background noise, and using said residual signal after cancellation of said local background noise, for adjusting said tap coefficients, wherein said noise level classifier classifies said local background noise into low, intermediate, and high levels, chooses said residual signal before cancellation of said local background noise when said local background noise is classified as low, chooses said residual signal after cancellation of said local background noise when said local background noise is classified as high, and chooses said residual signal before cancellation of said local background noise for adjusting some of said tap coefficients and said residual signal after cancellation of said local background noise for adjusting some other of said tap coefficients, when said local background noise is classified as intermediate. 